<template>
  <div>
    <div v-for="(item, index) in menuList" :key="index">
      <el-submenu :index="item.path" v-if="item.children && item.children.length > 0 && item.children[0].menuType === '1'">
        <template slot="title">
          <i :class="item.icon"></i>
          <span>{{item.menuName}}</span>
        </template>
        <item :menuList="item.children"></item>
      </el-submenu>
      <el-menu-item v-else-if="item.menuType === '1'" :index="item.path">{{item.menuName}}</el-menu-item>
    </div>
  </div>
</template>

<script>
export default {
  name: "Item",
  props: ["menuList"],
  data() {
    return {};
  },
  mounted() {},
  methods: {},
};
</script>

<style scoped >
</style>
